import { CoolController, BaseController } from '@cool-midway/core';
import { Body, Inject, Post, Get } from '@midwayjs/core';
import { UserInfoEntity } from '../../../user/entity/info';
import { UserShopService } from '../../service/user';

/**
 * 用户信息
 */
@CoolController({
  api: ['add', 'delete', 'update', 'info', 'list', 'page'],
  entity: UserInfoEntity,
  service: UserShopService,
  pageQueryOp: {
  },
})
export class UserInfoController extends BaseController {
  @Inject()
  userInfoService: UserShopService;

  @Post('/addUser')
  async addUser(@Body() body: {}) {
    const res = await this.userInfoService.addUser(body);
    return res;
  }
}
